﻿<local:DocumentBase x:Class="WPFExcelReport.JLTGB33"
           xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
          xmlns:local="clr-namespace:ReflectionStudio.Components.UserControls;assembly=ReflectionStudio.Core"
                
        xmlns:wep="clr-namespace:WPFExcelReport"
       
       Background="White" 
         Loaded="Window_Loaded" 
     >
    <local:DocumentBase.Resources>
    </local:DocumentBase.Resources>
    <Grid DataContext="{Binding}" Width="1021">
        <Grid.RowDefinitions>
            <RowDefinition Height="100" />
            <RowDefinition Height="225*" />
            <RowDefinition Height="316*" />
            <RowDefinition Height="59*" />
        </Grid.RowDefinitions>
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="512*"></ColumnDefinition>
            <ColumnDefinition Width="463*"></ColumnDefinition>
            <ColumnDefinition Width="49*" />
        </Grid.ColumnDefinitions>
        <!--<StackPanel Margin="0,0,19,0" Grid.RowSpan="4" Grid.ColumnSpan="2">
            <WrapPanel Width="950">
                <Label Content="采购单号："    Width="71" Margin="10,0,0,0"  HorizontalAlignment="Left"   FontSize="14" VerticalAlignment="Center" Foreground="#FF141111" />
                <TextBox Name="txtFKRS" Width="31" Margin="5,0,0,0"  HorizontalAlignment="Left" Background="Pink" Panel.ZIndex="1"
                         KeyUp="txtART_KeyUp" CharacterCasing="Upper" MaxLength="2" FontSize="14" Foreground="#FF141111" Height="33" />
                <TextBox Name="txtFLFD" Width="87" Margin="5,0,0,0"  HorizontalAlignment="Left" Background="Pink" Panel.ZIndex="2"
                         KeyUp="txtART_KeyUp" CharacterCasing="Upper" MaxLength="6" FontSize="14" Foreground="#FF141111" Height="33" />
                <Label Content="供应商编号："    Width="79" Margin="10,0,0,0"  HorizontalAlignment="Left"   FontSize="14" VerticalAlignment="Center" Foreground="#FF141111" Height="16" />
                <TextBox Name="txtSUPP" Width="89" Margin="5,0,0,0"  HorizontalAlignment="Left" Background="Beige" Panel.ZIndex="3"
                         KeyUp="txtART_KeyUp" CharacterCasing="Upper" MaxLength="8" FontSize="14" Foreground="#FF141111" Height="33" />
                <Label Content="采购下单日期从" Height="26" HorizontalAlignment="Left" Margin="10,5,0,0" Name="label3" VerticalAlignment="Top" Width="103" FontSize="14" />
                <DatePicker Height="25" HorizontalAlignment="Left" Margin="0,2,0,0" Name="FROM_DATE" VerticalAlignment="Top" Panel.ZIndex="4"
                                    SelectedDateChanged ="FROM_DATE_SelectedDateChanged" Width="113" />
                <Label Content="至" Height="28" HorizontalAlignment="Left" Margin="10,5,0,0" Name="label4" VerticalAlignment="Top" Width="19" FontSize="14" />
                <DatePicker Height="25" HorizontalAlignment="Left" Margin="0,2,0,0" Name="END_DATE" VerticalAlignment="Top" Panel.ZIndex="5"
                                    SelectedDateChanged ="END_DATE_SelectedDateChanged" Width="116" />

            </WrapPanel>
        </StackPanel>-->
        <StackPanel Margin="0,0,19,0" Grid.RowSpan="4" Grid.ColumnSpan="2">
            <WrapPanel Width="950">
                <Label Content="纱线编号(可模糊查询)："    Width="150" Margin="10,0,0,0"  HorizontalAlignment="Left"   FontSize="14" VerticalAlignment="Center" Foreground="#FF141111" Height="21" />
                <TextBox Name="txtARTICLE" Width="124" Margin="5,0,0,0"  HorizontalAlignment="Left" Background="Pink" Panel.ZIndex="6"
                         KeyUp="txtART_KeyUp" CharacterCasing="Upper" MaxLength="15" FontSize="14" Foreground="#FF141111" Height="33" />

                <Label Content="供应商编号："    Width="80" Margin="10,0,0,0"  HorizontalAlignment="Left"   FontSize="14" VerticalAlignment="Center" Foreground="#FF141111" Height="21" />
                <TextBox Name="txtSUPP" Width="87" Margin="5,0,0,0"  HorizontalAlignment="Left" Background="WhiteSmoke" Panel.ZIndex="7"
                         KeyUp="txtART_KeyUp" CharacterCasing="Upper" MaxLength="8" FontSize="14" Foreground="#FF141111" Height="33" />

                <Label Content="收货日期从" Height="26" HorizontalAlignment="Left" Margin="10,5,0,0" Name="label1" VerticalAlignment="Top" Width="76" FontSize="14" />
                <DatePicker Height="25" HorizontalAlignment="Left" Margin="0,2,0,0" Name="FROM_DN_DATE" VerticalAlignment="Top" Panel.ZIndex="8"
                                    SelectedDateChanged ="FROM_DN_DATE_SelectedDateChanged" Width="106" />
                <Label Content="至" Height="28" HorizontalAlignment="Left" Margin="10,5,0,0" Name="label2" VerticalAlignment="Top" Width="19" FontSize="14" />
                <DatePicker Height="25" HorizontalAlignment="Left" Margin="0,2,0,0" Name="END_DN_DATE" VerticalAlignment="Top" Panel.ZIndex="9"
                                    SelectedDateChanged ="END_DN_DATE_SelectedDateChanged" Width="107" />
                <Button Content="查询订单" Height="33" Margin="10,0,0,0"  Name="btnQuery" Width="64" Panel.ZIndex="9"
                        Click="btnQuery_Click"/>
                <Button Content="导出订单" Height="33" Margin="10,0,0,0"  Name="btnEXCEL" Width="65" Panel.ZIndex="10"
                        Click="btnEXCEL_Click"/>
            </WrapPanel>
            <WrapPanel Width="952" Height="618">
                <DataGrid CanUserReorderColumns="True"  
          CanUserResizeRows="True" CanUserSortColumns="True"
            
            AutoGenerateColumns="False"   
                  EnableRowVirtualization="True"  
                  Width="952"
                  Height="603" FontSize="11"
                  EnableColumnVirtualization="True"  
                  ScrollViewer.HorizontalScrollBarVisibility="Auto"
                  ScrollViewer.VerticalScrollBarVisibility="Auto"
                  RowDetailsVisibilityMode="VisibleWhenSelected" HorizontalAlignment="Stretch" VerticalAlignment="Stretch"
                               IsSynchronizedWithCurrentItem="True" Opacity="10" Visibility="Visible"
                               ItemsSource="{Binding}" x:Name="MasterDg" 
                               Grid.ColumnSpan="2" Margin="0,5,0,0" Grid.RowSpan="3" Grid.Row="1">
                    <!--ORDERNO	SUPP SUPPNAME	EKKBDAT		ARTICLE	GSHANDLNR QTY	INQTY	GPEINDAT	PRICE	SCHEDNO
                    LOT	SPART	AMM	BMM	CMM	DMM	AVCN	DIFCN	MINCN	CV	THINA	THINB	THICKA	
                    THICKB	NEPSA	NEPSB	HAIR	UINDEX	TITER	ENDB	ENDH	REMARK
-->
                    <DataGrid.Columns>
                        <DataGridTextColumn Binding="{Binding Path=ARTICLE}" Header="纱线编号" Width="SizeToCells" MinWidth="70" />
                        <DataGridTextColumn Binding="{Binding Path=GSHANDLNR}" Header="纱线描述" Width="SizeToCells" MinWidth="70" />
                        <DataGridTextColumn Binding="{Binding Path=SUPP}" Header="供应商" Width="SizeToCells" MinWidth="80" />
                        <DataGridTextColumn Binding="{Binding Path=SUPPNAME}" Header="供应商名称" Width="SizeToCells" MinWidth="80" />
                        <DataGridTextColumn Binding="{Binding Path=GPEINDAT}" Header="入库日期" Width="SizeToCells" MinWidth="50"  />
                        <DataGridTextColumn Binding="{Binding Path=INQTY}" Header="入库量KG" Width="SizeToCells" MinWidth="50" />
                        <DataGridTextColumn Binding="{Binding Path=LOT}" Header="批号" Width="SizeToCells" MinWidth="40" />
                        <DataGridTextColumn Binding="{Binding Path=SPART}" Header="纺批" Width="SizeToCells" MinWidth="40" />
                        <DataGridTextColumn Binding="{Binding Path=AMM}" Header="1mm" Width="SizeToCells" MinWidth="30" />
                        <DataGridTextColumn Binding="{Binding Path=BMM}" Header="2mm" Width="SizeToCells" MinWidth="30" />
                        <DataGridTextColumn Binding="{Binding Path=CMM}" Header="3mm" Width="SizeToCells" MinWidth="30" />
                        <DataGridTextColumn Binding="{Binding Path=DMM}" Header="4mm" Width="SizeToCells" MinWidth="30" />
                        <DataGridTextColumn Binding="{Binding Path=AVCN}" Header="平均断裂强力" Width="SizeToCells" MinWidth="40" />
                        <DataGridTextColumn Binding="{Binding Path=DIFCN}" Header="偏差" Width="SizeToCells" MinWidth="30" />
                        <DataGridTextColumn Binding="{Binding Path=MINCN}" Header="最低" Width="SizeToCells" MinWidth="40" />
                        <DataGridTextColumn Binding="{Binding Path=CV}" Header="CV" Width="SizeToCells" MinWidth="30" />
                        <DataGridTextColumn Binding="{Binding Path=THINA}" Header="-40%细节" Width="SizeToCells" MinWidth="30" />
                        <DataGridTextColumn Binding="{Binding Path=THINB}" Header="-50%细节" Width="SizeToCells" MinWidth="30" />
                        <DataGridTextColumn Binding="{Binding Path=THICKA}" Header="+35%粗节" Width="SizeToCells" MinWidth="30" />
                        <DataGridTextColumn Binding="{Binding Path=THICKB}" Header="+50%粗节" Width="SizeToCells" MinWidth="30" />
                        <DataGridTextColumn Binding="{Binding Path=NEPSA}" Header="140%棉结" Width="SizeToCells" MinWidth="30" />
                        <DataGridTextColumn Binding="{Binding Path=NEPSB}" Header="200%棉结" Width="SizeToCells" MinWidth="30" />
                        <DataGridTextColumn Binding="{Binding Path=HAIR}" Header="回潮" Width="SizeToCells" MinWidth="30" />
                        <DataGridTextColumn Binding="{Binding Path=UINDEX}" Header="乌斯特值" Width="SizeToCells" MinWidth="40" />
                        <DataGridTextColumn Binding="{Binding Path=TITER}" Header="支数" Width="SizeToCells" MinWidth="40" />
                        <DataGridTextColumn Binding="{Binding Path=ENDB}" Header="重最正偏差" Width="SizeToCells" MinWidth="30" />
                        <DataGridTextColumn Binding="{Binding Path=ENDH}" Header="重最负偏差" Width="SizeToCells" MinWidth="30" />
                        <DataGridTextColumn Binding="{Binding Path=REMARK}" Header="备注" Width="SizeToCells" MinWidth="50" />
                        
                    </DataGrid.Columns>
                </DataGrid  >
            </WrapPanel>
        </StackPanel>
    </Grid>
</local:DocumentBase>
